|
|
|
|
|
|
|
|
Internet Explorer hosts VBScript that runs on the user's desktop. VBScript does not currently run in Netscape Navigator. However, VBScript in Active Server Pages runs on Internet Information Server, allowing you to use VBScript to create browser-independent HTML or generate browser-specific pages on the fly.  |
|
|
|
|
|
|
|
|
|
|
Although the VBScript language works the same everywhere, each host application exposes a different set of objects to VBScript. So some of the statements that work in IE do not work in IIS and vice versa. |
|
|
|
|
|
|
|
|
Many people who use VBScript with Web pages use a simple text editor to enter VBScript code because VBScript does not (yet) have its own integrated development environment. This means all the great IDE features you are used to in regular VB are not available. You have to be careful that what you enter is spelled and formatted correctly. Some more advanced text editors, such as HomeSite, help you with VBScript code entry by providing automatic color-coding and toolbar buttons for commonly used statements. |
|
|
|
|
|
|
|
|
Although a text editor as simple as Notepad will work, I recommend one that shows you line numbers. When an error occurs in your code, Internet Explorer returns the line number, as shown in Figure 30.5. |
|
|
|
|
|
|
|
|
Figure 30.5
When an error occurs in your VBScript code,
Internet Explorer displays the offending line
number, which you can use to track down the error. |
|
|
|
|
|
|
|
|
By leaving the text editor and browser open at the same time, you can easily switch back and forth between them. This is one way to debug VBScript: Edit and save the code, and then click the Refresh button on the browser to try again. |
|
|
|
|
|
|
|
|
If you get tired of just using a text editor, you may want to try some of the more advanced Web tools, such as the following: |
|
|
|
|
|
|
|
|
ActiveX Control PadA free tool from Microsoft, really not that advanced, but it does provide a way to get class IDs for ActiveX controls. |
|
|
|
|
|
|
|
|
Microsoft FrontPageA Web page creation application. FrontPage includes a Script Wizard, which creates VBScript code for you and makes working with ActiveX controls and events easy. |
|
|
|
|
|